<?php
require_once '../requires.php';

$ftp = new FtpUtil();

//info : get the ftp server's info
var_dump($ftp->info());

//download, download_nb : download a file
//var_dump($ftp->download('/jason540/web/index.php', 'save.php'));

//finfo : get info of a file
//var_dump($ftp->finfo('/jason540/web/index.php'));

//chdir : change current dir
//$ftp->chdir('/jason540/web');
//var_dump($ftp->info());

//mkdir : build a new dir
//var_dump($ftp->mkdir('/jason540/web/test'));

//rename : rename a file or dir
//var_dump($ftp->rename('/jason540/web/test', '/jason540/web/test_new'));

//upload, upload_nb : upload a file
//var_dump($ftp->upload('save.php', '/jason540/web/test_new/test2.php'));
//var_dump($ftp->upload_nb('save.php', '/jason540/web/test_new/test4.php'));

//chmod : change mode
//var_dump($ftp->chmod('/jason540/web/test_new/test4.php'));

//flist : list files
//var_dump($ftp->flist('/jason540/web/test_new', false));

//delete : delete a file
//var_dump($ftp->delete('/jason540/web/test_new/test1.php'));

//rmdir : remove a dir and files in it
//var_dump($ftp->rmdir('/jason540/web/test_new'));
?>